{% load i18n %}

{% autoescape off %}
<link rel="stylesheet" type="text/css" 
      href="{{ base_site_url }}/dms_media/javascript/yui/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" 
      href="{{ base_site_url }}/dms_media/javascript/yui/build/tabview/assets/skins/sam/tabview.css" />
<script type="text/javascript" 
      src="{{ base_site_url }}/dms_media/javascript/yui/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" 
      src="{{ base_site_url }}/dms_media/javascript/yui/build/element/element-beta.js"></script>
<script type="text/javascript" 
      src="{{ base_site_url }}/dms_media/javascript/yui/build/tabview/tabview.js"></script>

<script type="text/javascript" src="/dms_media/javascript/overlib/overlib.js-small"></script>
<script type="text/javascript" src="/dms_media/javascript/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init ( {
  language : "de",
  convert_urls : false,
  relative_urls : false,
  mode : "exact",
  elements : "ta,ta1,ta2,ta3,ta4,ta5,ta6,ta7,ta8,ta9,ta10",
  theme : "advanced",
  //button_tile_map : "true",
  theme_advanced_disable : "strikethrough,indent,outdent,styleselect,justifyfull",
  plugins : "table,preview,searchreplace,paste,fullscreen",
  theme_advanced_buttons1 : "bold,italic,underline,separator,unfo,redo,separator,bullist,numlist,separator,hr,sub,sup,charmap,separator,formatselect,separator,link,unlink,image,separator,fullscreen,separator,code,help",
  theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator,tablecontrols,separator,cleanup",
  theme_advanced_buttons3 : "",
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  extended_valid_elements : "span[class|align|style]",
  theme_advanced_resize_horizontal : false,
  theme_advanced_resizing : true} );
</script>

<br />
<div class="comments">
<h4 style="margin-top:-0.1em;">Kommentarbereich</h4>

{{ comments }}

  <script type="text/javascript">
  function do_show_form () {
    document.getElementById("show_more").style.display="none";
    document.getElementById("text_form").style.display="inline";
    document.getElementById("show_less").style.display="inline";
  }
  function do_hide_form (id) {
    document.getElementById("text_form").style.display="none";
    document.getElementById("show_less").style.display="none";
    document.getElementById("show_more").style.display="inline";
  }
  </script>
  <p>
    <a id="show_more" class="navLink"
        href="javascript:void(0)" onClick="do_show_form()"
        title="{% trans "Eingabeformular anzeigen ..." %}">
        {{ control }}{% trans "Eingabeformular ausfalten ..." %}</a>
    <a id="show_less" class="navLink" style="display:none"
        href="javascript:void(0)" onClick="do_hide_form()"
        title="{% trans "Anzeigeformular verstecken ..." %}">
        {{ control }}{% trans "Eingabeformular einfalten ..." %}</a>
  </p>
  <div id="text_form" style="display:none;">
    <form method="post"
          name  ="form_input"
          action="/add_comment/">
    {{ form }}

    <p align="right" style="margin-top:0.5em;">
    <input name="item_id" type="hidden" value="{{ item_id }}" />
    <input name="next" type="hidden" value="{{ next }}" />
    <input name="submit" type="submit" value="{{ submit }} ..." />
    </p>
    </form>

  </div>
</div>
<script>
 var editTab = new YAHOO.widget.TabView('editForm');
</script>
{% endautoescape %}
